#ifndef _FILE_MANAGE_H_
#define _FILE_MANAGE_H_

#include "crossplat_def.h"
#include <string>
#include "cross_com.h"
#include "serial_file_base.h"
#include "rec_info.h"

class CRecfileInfo
{
public:
	CRecfileInfo();
	~CRecfileInfo();
	static int CreateRecordInfo(const char* storage_path,uint32_t recblk_sz,uint32_t indexInfoSize, int indexNum);
	int StartRecInfo(uint32_t idxNo, uchar_t * data_buf);
	int EndRecInfo(uint32_t idxNo,uchar_t * data_buf);
	uint32_t GetInfoOffset(uint32_t idxNo);
protected:
	CSerialFileBase  *  m_pFile;
	uint32_t      m_recInfoOffset;
	uint32_t      m_infoSize;
	uint32_t      m_recSize;
};

#endif
